<template>
	<div class="conPpageBox">
		<div class="navbar">
			<div class="hearderBoxIcon" @click="goBack">
				<img src="../../assets/images/fanhuijiantou.png" alt="">
			</div>
			<div class="title">{{$t('indexTitle.title33')}}</div>
			<div class="right"></div>
		</div>
		<div class="nrc-tabs">
			<div class="noticeBox">
				<div class="noticeBoxTitle">
					{{noticeDetali.title}}
				</div>
				<div class="noticeBoxCon">
					{{noticeDetali.content}}
				</div>
				<div class="noticeBoxTime">
					{{noticeDetali.created_at}}
				</div>
			</div>
		</div>
		<loadingFour :msgText="msgTextTow" v-if="isShowLoadingTeow" @closeGuanbiTow="closeGuanbi"></loadingFour>
		<!-- <div class="buttons">
			<img src="../../assets/images/xiaoxi.png" alt="" />
		</div> -->
	</div>
</template>

<script>
	import {
		noticeDetalis
	} from "../../utils/api.js"
	import loadingFour from '../../components/loadingFour.vue';
	export default {
		data() {
			return {
				tab: 0,
				id: "",
				showloading: false,
				noticeDetali: {},
				baseURL: process.env.VUE_APP_URL,
				msgTextTow: "",
				isShowLoadingTeow: false
			}
		},
		components: {
			loadingFour
		},
		created() {

		},
		mounted() {
			this.id = this.$route.query.id;
			this.getNoticeDetalis()
		},
		methods: {
			closeGuanbi(e) {
				this.isShowLoadingTeow = false;
			},
			getNoticeDetalis() {
				this.noticeDetali = {};
				let that = this;
				let data = {
					id: this.id
				}
				noticeDetalis(data).then((res) => {
					if (res.status.errorCode == 0) {
						console.log(res.data.data);
						this.noticeDetali = res.data;
					} else {
						// this.$message.error(res.status.msg);
						this.msgTextTow = res.status.msg;
						this.isShowLoadingTeow = true;
							setTimeout(()=>{
								this.isShowLoadingTeow = false;
							},2000)
						// this.$message({
						// 	showClose: true,
						// 	message: res.status.msg,
						// 	type: 'error'
						// });
					}
				}).catch((err) => {
					console.log(err, 'err')
				});
			},
			changetab(e) {
				this.tab = e
				this.showloading = true;
				this.getNoticeList()
				let that = this;
				setTimeout(function() {
					that.showloading = false
				}, 3000)
			},
			goBack() {
				this.$router.go(-1)
			},
		}
	}
</script>

<style scoped>
	* {
		box-sizing: border-box;
		margin: 0;
		padding: 0;
	}

	.conPpageBox {
		height: 90vh;
		overflow-y: auto;
		overflow-x: hidden;
		padding-top: calc(constant(safe-area-inset-top) + 0px);
		padding-top: calc(env(safe-area-inset-top) + 0px);
		padding-bottom: calc(constant(safe-area-inset-bottom) + 85px);
		padding-bottom: calc(env(safe-area-inset-bottom) + 85px);
		box-sizing: border-box;
		position: fixed;
		z-index: 1;
		-webkit-overflow-scrolling: touch;
		width: 100%;
	}

	.navbar {
		background-color: #fff;
		box-shadow: inset 0 -1px 0 #ececec;
		color: #545658;
		height: 45px;
		left: 0;
		overflow: hidden;
		display: flex;
		justify-content: space-between;
		align-items: center;
		position: fixed;
		padding: 0 10px;
		top: 0;
		width: 100%;
		z-index: 99;
	}

	.hearderBoxIcon {
		flex: .25;
		line-height: 1;
	}

	.hearderBoxIcon img {
		width: 26px;
		height: 26px;
	}

	.title {
		flex: 1;
		font-size: 20px;
		line-height: 1;
		text-align: center;
	}

	.right {
		flex: .25;
	}

	.nrc-tabs {
		background-color: #fff;
		margin-top: 55px;
	}

	.nrc-tabs-nav {
		align-items: center;
		display: flex;
		background-color: #fff;
		border-bottom-color: #e9e9e9;
		justify-content: space-evenly;
	}

	.nrc-tabs-tab {
		flex: 1;
		font-weight: 400;
		line-height: unset;
		box-sizing: border-box;
		display: block;
		font-size: 16px;
		font-stretch: normal;
		font-style: normal;
		text-align: center;
		min-width: 65px;
		padding: 8px;
	}

	.nrc-tabs-tab.active {
		background-image: unset;
		border-bottom: 2px solid #7240ff;
		color: #7240ff;
	}

	.content-block {
		background-color: #fff;
		display: flex;
		flex-direction: column;
		height: 100%;
		justify-content: space-between;
		padding: 20px;
	}

	.actions {
		display: flex;
		justify-content: space-between;
		padding: 5px 10px;
		width: 100%;
	}

	.actions img {
		width: 22px;
		height: 22px;
		margin-left: 15px;
	}

	.actions img .loading {
		animation: turn 3s linear;
	}

	@keyframes turn {
		0% {
			transform: rotate(0deg);
		}

		33% {
			transform: rotate(90deg);
		}

		66% {
			transform: rotate(180deg);
		}

		100% {
			transform: rotate(270deg);
		}
	}

	.no-data-container {
		color: #545658;
		display: flex;
		flex-direction: column;
		font-size: 14px;
		justify-content: center;
		min-height: calc(100vh - 117px);
		opacity: .6;
		text-align: center;
	}

	.buttons {
		position: fixed;
		bottom: 10%;
		right: 10px;
		background-color: #99D2E3;
		width: 60px;
		height: 60px;
		border-radius: 50%;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.buttons img {
		width: 32px;
		height: 32px;
	}

	.noticeBox {
		background-color: #fafafc;
		border-radius: 5px;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		font-size: 14px;
		justify-content: space-between;
		padding: 15px;
		width: 95%;
		margin: 0px auto 0;
	}

	.noticeBoxTitle {
		color: #545658;
		line-height: 16px;
		margin-bottom: 6px;
	}

	.noticeBoxCon {
		color: #939698;
		flex: 1;
		font-size: 13px;
		line-height: 18px;
		padding: 0 3px 0 0;
	}

	.noticeBoxTime {
		width: 100%;
		text-align: right;
		font-size: 12px;
		margin-top: 5px;
		color: #939698;
	}
</style>